﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class MessageDirectiveElement : DirectiveElement
    {
        private ExpressionElement message;

        public ExpressionElement Message { get { return message; } set { message = value; } }

        public MessageDirectiveElement(TokenInfo Token, ExpressionElement Message, List<TokenInfo> Comments)
            : base(Token, Comments)
        {
            message = Message;
        }

        public override string ToString()
        {
            return string.Format("message {0}", message);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return message;
        }
    }
}
